package cn.favebook.bean;

import java.util.Date;

import javax.json.Json;
import javax.json.JsonObject;

public class Weibo {
	private int id;
	private String content;
	private Date publishDate;
	private int userID;
	private String userName;
	
	public JsonObject toJson() {
		return Json.createObjectBuilder()
				.add("id", id)
				.add("content", content)
				.add("publishDate", publishDate.toString())
				.add("userId", userID)
				.add("username", userName)
				.build();
	}
	
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Date getPublishDate() {
		return publishDate;
	}
	public void setPublishDate(Date publishDate) {
		this.publishDate = publishDate;
	}
	public int getUserID() {
		return userID;
	}
	public void setUserID(int userID) {
		this.userID = userID;
	}
	
}
